<?php

if (isset($_GET["getweeks"]) && isset($_GET["week"]))
{
	$weeknr = $_GET["week"];

	$QUERY = "
		SELECT DISTINCT studieuur 
		FROM intekenen";
	////echo $Qweeknr;
	$resultweeknr = mysql_query($QUERY);
	$studieuurArr = array();
	$aantalstudieuren = mysql_numrows($resultweeknr);
	////echo $aantalstudieuren;
	for($i=0; $i<$aantalstudieuren; $i++) //zet alle weeknrs in $studieuurArr[]
	{
		$studieuurArr[$i] = mysql_result($resultweeknr, $i, "studieuur");
		//$studieuurArr[$i] = substr($studieuurArr[$i], 0, 2);
	}
	
	$weeknrArr = array();
	for($i=0; $i < $aantalstudieuren; $i++)
	{
		if (!in_array($studieuurArr[$i], $weeknrArr))
		{$weeknrArr[sizeof($weeknrArr)] =	$studieuurArr[$i];}
	}
}

?>